package com.lingnan.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lingnan.entity.po.JobViewRecord;
import com.lingnan.vo.JobViewRecordVO;

// JobViewRecordService.java
public interface JobViewRecordService extends IService<JobViewRecord> {
    
    /**
     * 记录用户浏览职位（去重）
     */
    boolean recordJobView(Long userId, Long jobId, String ipAddress, String userAgent);
    
    /**
     * 检查用户是否已浏览过该职位
     */
    boolean hasUserViewedJob(Long userId, Long jobId);
    
    /**
     * 获取职位的真实浏览用户数
     */
    int getJobViewUserCount(Long jobId);
    
    /**
     * 获取用户浏览记录
     */
    IPage<JobViewRecordVO> getUserViewRecords(Long userId, int current, int size);
}